﻿<div>
    <form name="tenantCreateForm" novalidate>

        <div class="modal-header">
            <button type="button" class="close" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
            <h4 class="modal-title">
                <span>@L("CreateNewTenant")</span>
            </h4>
        </div>

        <div class="modal-body">
            <div class="form-group form-float">
                <div class="form-line">
                    <input class="form-control" type="text" name="TenancyName" ng-model="vm.tenant.tenancyName" required maxlength="64" minlength="2">
                    <label class="form-label">@L("TenancyName")</label>
                </div>
            </div>
            <div class="form-group form-float">
                <div class="form-line">
                    <input type="text" name="Name" class="form-control" ng-model="vm.tenant.name" required maxlength="128">
                    <label class="form-label">@L("Name")</label>
                </div>
            </div>
            <div class="form-group form-float">
                <div class="form-line">
                    <input type="text" name="ConnectionString" class="form-control" ng-model="vm.tenant.connectionString" maxlength="1024">
                    <label class="form-label">@L("DatabaseConnectionString") (@L("Optional"))</label>
                </div>
            </div>
            <div class="form-group form-float">
                <div class="form-line">
                    <input type="email" name="AdminEmailAddress" class="form-control" ng-model="vm.tenant.adminEmailAddress" required maxlength="256">
                    <label class="form-label">@L("AdminEmailAddress")</label>
                </div>
            </div>
            <div class="form-group form-float">
                <div class="">
                    <input id="isactive" type="checkbox" name="IsActive" ng-model="vm.tenant.isActive" checked class="form-control" />
                    <label for="isactive" class="form-label">@L("IsActive")</label>
                </div>
            </div>
            <p>@L("DefaultPasswordIs", "123qwe")</p>
        </div>

        <div class="modal-footer">
            <button type="button" class="btn btn-default" ng-click="vm.cancel()">@L("Cancel")</button>
            <button type="submit" class="btn btn-primary blue" ng-click="vm.save()" ng-disabled="tenantCreateForm.$invalid">@L("Save")</button>
        </div>

    </form>
</div>